/**
 * Created by Dalyn on 2017/3/24.
 */
import Relay from "react-relay";

export default class orderPaymentRecordMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { orderPaymentRecord }`;
    }

    getVariables() {
        return {
            argsInput: {
              enid: this.props.enid,
              orderId: this.props.orderId,
            	pageNum: this.props.pageNum,
              pageSize: this.props.pageSize
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on orderPaymentRecordPayload {
            data {
                errorCode
                value
                totalResult
                id
                orderPaymentRecordDomainList{
                    paymentRecordId
                    partyAEnid
                    partyAEnName
                    partyBEnid
                    partyBEnName
                    orderId
                    payment
                    orderMoney
                    masterPayment
                    mainAccount
                    loanMoney
                    createTime
                }
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
                fragment on orderPaymentRecordPayload {
                    data {
                        errorCode
                        value
                        totalResult
                        id
                        orderPaymentRecordDomainList{
                            paymentRecordId
                            partyAEnid
                            partyAEnName
                            partyBEnid
                            partyBEnName
                            orderId
                            payment
                            orderMoney
                            masterPayment
                            mainAccount
                            loanMoney
                            createTime
                        }
                    }
                }
            `]
        }];
    }

}
